<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchCleanPlan.ascx.vb"
    Inherits="WebForm_ManageWorkRecord_SearchCleanPlan" %>
<%@ Register Src="~/WebForm/CommonControl/AnnualControl.ascx" TagName="AnnualControl"
    TagPrefix="My" %>
    <%@ Register Src="~/WebForm/CommonControl/MonthDayControl.ascx" TagName="MonthDayControl" TagPrefix="My" %>

<%--<asp:UpdatePanel ID="up" runat="server">
     <ContentTemplate>--%>
        <table cellpadding="0" cellspacing="0" width="100%" border="0">
           <tr>
                <td colspan="4">
                    <table>
                     <tr>
                        <td align="right">
                            <asp:Label ID="lblAnnual" runat="server" meta:resourcekey="lblAnnual"></asp:Label>
                        </td>
                         <td align="left">
                            <My:AnnualControl ID="AnnualControl1" runat="server" AutoPostBack="true" />
                         </td>  
                         <td align="right">
                         </td>
                         <td align="left">
                         </td>
                    </tr>
                   </table>
               </td>
           </tr>
           <tr>
                <td colspan="4">
                    <table>
                        <tr>
                          <td align="right">
                             <asp:Label ID="lblOrganization" runat="server" meta:resourcekey="lblOrganization"></asp:Label>
                          </td>
                          <td align="left">
                              <%--   <asp:DropDownList ID="ddlOrganization" runat="server"   DataTextField="OrganizationName" DataValueField="UOrganizationID" AutoPostBack="true" OnInit="ddlOrganization_Init">
                                 </asp:DropDownList>--%>
                             <My:DropDown ID="ddlOrganization" runat="server" PopupControlID="pnlOrg" AutoPostBack="true"
	                         OnSelectedIndexChanged="ddlOrganization_SelectedIndexChanged"></My:DropDown>
<%--                             <asp:RequiredFieldValidator ID="rfvOrganization" runat="server" Display="None" ControlToValidate="ddlOrganization" meta:resourcekey="rfvOrganization" ValidationGroup="vQuery"></asp:RequiredFieldValidator>
--%>                          </td>         
                          <asp:PlaceHolder ID="phVOrganizationID" runat="server" Visible="false">
                             <td align="right">
                                <asp:Label ID="lblVOrganizationID" runat="server" Text="<%$ Resources:VOrganizationID %>"></asp:Label>
                             </td>
                             <td align="left">  
                            <%--    <asp:DropDownList ID="ddlVOrganizationID" runat="server" AutoPostBack="false">
                                </asp:DropDownList>--%>
                            <My:DropDown ID="ddlVOrganizationID" runat="server" PopupControlID="pnlVOrg"></My:DropDown>

                             </td>
                        </asp:PlaceHolder>
                      </tr>
                   </table>
                 </td>     
              </tr>
              <tr>
              <td colspan="4">
                <table>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblItemType" runat="server" meta:resourcekey="lblItemType"></asp:Label>
                         </td>
                         <td align="left">
                    <%--        <asp:DropDownList ID="ddlPlanItemType" runat="server" AutoPostBack="true">
                            </asp:DropDownList>--%>
                              <My:DropDown ID="ddlPlanItemType" runat="server" PopupControlID="pnlPlanItemType" AutoPostBack="true"
                              OnSelectedIndexChanged="ddlPlanItemType_SelectedIndexChanged"></My:DropDown>
                        </td>
                          <td align="right">
                            <asp:Label ID="lblCleanPlan" runat="server" meta:resourcekey="lblCleanPlan"></asp:Label>
                         </td>
                         <td align="left">  
                       <%--     <asp:DropDownList ID="ddlCleanPlan" runat="server" Width="430px">
                            </asp:DropDownList>--%>
                            <My:DropDown ID="ddlCleanPlan" runat="server" PopupControlID="pnlCleanPlan"></My:DropDown>

                        </td> 
                </tr>
                </table>
               </td>
             </tr>
             <tr>
                 <td colspan="4">
                    <table>
                     <tr>
                         <td align="right">
                            <asp:Label ID="lblTakeDate" runat="server" Text="<%$ Resources:LabelTakeDate %>"></asp:Label>
                        </td>
                        <td align="left">
                            <My:MonthDayControl ID="txtTakeStartDate" runat="server" />~
                            <My:MonthDayControl ID="txtTakeEndDate" runat="server" />
                        </td>
                         <td align="right">
                         </td>
                         <td align="left">
                         </td>
                     </tr>
                    </table>
                 </td>
            </tr>
            <tr>
                 <td colspan="4">
                    <table>
                     <tr>
                         <td align="right">
                            <asp:Label ID="lblWorkStartDate" runat="server" Text="<%$ Resources:LabelWorkStartDate %>"></asp:Label>
                        </td>
                        <td align="left">
                            <My:MonthDayControl ID="txtWorkDateStart" runat="server" />~
                            <My:MonthDayControl ID="txtWorkDateEnd" runat="server" />
                        </td>
                         <td align="right">
                         </td>
                         <td align="left">
                         </td>
                     </tr>
                    </table>
                 </td>
            </tr>
             <tr>
                 <td colspan="4">
                    <table>
                     <tr>
                         <td align="right">
                             <asp:CheckBox ID="chkCleanPlanOnly" runat="server" meta:resourcekey="chkCleanPlanOnly" />
                        </td>
                        <td align="left">
                             <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" Text="<%$ Resources:Query %>" ValidationGroup="vQuery" />
                        </td>
                         <td align="right">
                         </td>
                         <td align="left">
                         </td>
                     </tr>
                    </table>
                 </td>
            </tr>
        </table>
             
        <br />
        <My:MyGridView ID="GV" runat="server" SkinID="pager" AllowHoverSelect="False" DataKeyNames="PlanID,WorkHeaderId"
            AllowHoverEffect="False" MySortDirection="Ascending" AutoGenerateColumns="False"
            AllowPaging="True" AllowSorting="True" meta:resourcekey="gv">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Active %>">
                    <itemtemplate>
                        <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>

                <asp:BoundField DataField="PlanName" HeaderText="<%$ Resources:PlanName %>" SortExpression="PlanName" />
                <asp:TemplateField HeaderText="<%$ Resources:PlanDate %>">
                    <itemtemplate>
                        <%#Eval("StartDate") %>~<%#Eval("EndDate") %>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="VOrganizationName" HeaderText="<%$ Resources:VOrganizationName %>"
                    SortExpression="VUOrganizationID" />
                <asp:BoundField DataField="LeaderName" HeaderText="<%$ Resources:LeaderName %>" SortExpression="LeaderID" />
                <asp:BoundField DataField="TakeDate" HeaderText="<%$ Resources:TakeDate %>" SortExpression="TakeDate" />
                <asp:TemplateField HeaderText="<%$ Resources:WorkStartDate %>">
                    <itemtemplate>
                        <%#Eval("WorkStartDate") %>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <itemtemplate>
                        <asp:MultiView ID="mvForm" runat="server" ActiveViewIndex="0">                
                            <asp:View ID="vwEdit" runat="server">
                        <asp:LinkButton ID="lbtnEdit" runat="server" OnClick="lbtnEdit_Click" Text="<%$ Resources:Edit %>"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnApprove" runat="server" OnClick="lbtnEdit_Click" Text="<%$ Resources:Approve %>"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                            OnClientClick="<%$ Resources:DeleteConfirm %>" Text="<%$ Resources:Delete %>"></asp:LinkButton>
                        
                            </asp:View>                                    
                            <asp:View ID="vwSelect" runat="server">
                        <asp:LinkButton ID="lbtnSelect" runat="server" 
                            Text="<%$ Resources:Select %>" OnClick="lbtnSelect_Click"></asp:LinkButton>                                
                            </asp:View>
                            <asp:View ID="vwTake" runat="server">
                        <asp:LinkButton ID="lbtnTake" runat="server" OnClick="lbtnTake_Click" Text="<%$ Resources:Take %>"></asp:LinkButton>
                            </asp:View>                                                        
                        </asp:MultiView>
                                    
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
            </Columns>
        </My:MyGridView>
<%--</ContentTemplate>
</asp:UpdatePanel>
--%>